import React from 'react';
import { Component } from 'react';
require('./ShopItem.less');

export default class ShopItem extends Component {
    constructor() {
        super();
    }
  render() {
    const { index, shop } = this.props;
    var score = "";
    for(let i=0;i<Math.ceil(shop.userScore);i++){
        score += "*";
    }
    return (
	    <div className="shopItem-container" >
            <section className="shop_head">
                <img src={`client/images/${shop.logoSrc}`} class="shop_head_img"/>
            </section>
            <section className="shop_content">
                <section className="shop_name">{shop.name}</section>
                <section className="shop_evaluate">{score}</section>
                <section className="shop_distance">￥20起送</section>
                <section className="shop_activities">新用户下单减17.7元</section>
                <section className="shop_activities">满40减20</section>
            </section>
        </div>
    )
  }
};